package com.ferryc.modules.sys.entity.param;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.ferryc.commons.entity.DataEntity;
import com.ferryc.modules.sys.entity.SysLogInfo;

/**
 * 
 * 类名: SysLogInfoParam <br/>
 * 作用： <br/>
 * 方法： <br/>
 * 创建者: Ferry C <br/>
 * 添加时间: 2017年11月07日 08:14:42 <br/>
 * 
 */
@SuppressWarnings("serial")
public class SysLogInfoParam extends DataEntity<SysLogInfoParam> {

	/** 菜单 */
	private String menu;

	/** RequestUri */
	private String requestUri;

	/** IpAddr */
	private String ipAddr;

	/** 日志类型，1正常，2异常 */
	private String type;

	/** 操作方式 */
	private String method;

	/** UserAgent */
	private String userAgent;

	/** 请求参数 */
	private String params;

	/** 异常信息 */
	private String exception;

	/** TimeConsuming */
	private String timeConsuming;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date startDate;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date endDate;

	/**
	 * 参数转换
	 * 
	 * @return SysLogInfo
	 */
	public SysLogInfo toSysLogInfo() {
		SysLogInfo po = new SysLogInfo();
		po.setId(this.id);
		po.setMenu(this.menu);
		po.setRequestUri(this.requestUri);
		po.setIpAddr(this.ipAddr);
		po.setType(this.type);
		po.setCreateBy(this.createBy);
		po.setCreateDate(this.createDate);
		po.setMethod(this.method);
		po.setUserAgent(this.userAgent);
		po.setParams(this.params);
		po.setException(this.exception);
		po.setTimeConsuming(this.timeConsuming);
		po.setLimit(this.limit);
		po.setOffset(this.offset);
		po.setLikeName(this.likeName);
		po.setStartDate(this.startDate);
		po.setEndDate(endDate);
		return po;
	}

	public String getMenu() {
		return menu;
	}

	public void setMenu(String menu) {
		this.menu = menu;
	}

	public String getRequestUri() {
		return requestUri;
	}

	public void setRequestUri(String requestUri) {
		this.requestUri = requestUri;
	}

	public String getIpAddr() {
		return ipAddr;
	}

	public void setIpAddr(String ipAddr) {
		this.ipAddr = ipAddr;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public String getUserAgent() {
		return userAgent;
	}

	public void setUserAgent(String userAgent) {
		this.userAgent = userAgent;
	}

	public String getParams() {
		return params;
	}

	public void setParams(String params) {
		this.params = params;
	}

	public String getException() {
		return exception;
	}

	public void setException(String exception) {
		this.exception = exception;
	}

	public String getTimeConsuming() {
		return timeConsuming;
	}

	public void setTimeConsuming(String timeConsuming) {
		this.timeConsuming = timeConsuming;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

}